/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.persistencia.domain;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;
import javax.validation.constraints.NotNull;

/**
 *
 * @author SHERLY
 */
@Embeddable
public class AsignaturaprerequisitoPK implements Serializable {
    @Basic(optional = false)
    @NotNull
    @Column(name = "nAsgId")
    private int nAsgId;
    @Basic(optional = false)
    @NotNull
    @Column(name = "nAsgPreRqsId")
    private int nAsgPreRqsId;

    public AsignaturaprerequisitoPK() {
    }

    public AsignaturaprerequisitoPK(int nAsgId, int nAsgPreRqsId) {
        this.nAsgId = nAsgId;
        this.nAsgPreRqsId = nAsgPreRqsId;
    }

    public int getNAsgId() {
        return nAsgId;
    }

    public void setNAsgId(int nAsgId) {
        this.nAsgId = nAsgId;
    }

    public int getNAsgPreRqsId() {
        return nAsgPreRqsId;
    }

    public void setNAsgPreRqsId(int nAsgPreRqsId) {
        this.nAsgPreRqsId = nAsgPreRqsId;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (int) nAsgId;
        hash += (int) nAsgPreRqsId;
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof AsignaturaprerequisitoPK)) {
            return false;
        }
        AsignaturaprerequisitoPK other = (AsignaturaprerequisitoPK) object;
        if (this.nAsgId != other.nAsgId) {
            return false;
        }
        if (this.nAsgPreRqsId != other.nAsgPreRqsId) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.persistencia.domain.AsignaturaprerequisitoPK[ nAsgId=" + nAsgId + ", nAsgPreRqsId=" + nAsgPreRqsId + " ]";
    }
    
}
